-- GENERATED SPELL FOR [Barak Kodobane] --


function spell0_3394(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3394', 2338, 1)
end

function spell1_3394(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3394', 623, 1)
end

function Sorts_3394(pUnit, Event)
local choix_sorts_3394 = math.random(0, 1)
if choix_sorts_3394 == 0 then
pUnit:RegisterEvent('spell0_3394', 1, 1)
end
if choix_sorts_3394 == 1 then
pUnit:RegisterEvent('spell1_3394', 1, 1)
end
end

function mob3394_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3394', math.random(1500, 3000), 1)
end

function mob3394_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3394_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3394_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3394, 1, 'mob3394_Action')
RegisterUnitEvent(3394, 2, 'mob3394_Leave')
RegisterUnitEvent(3394, 3, 'mob3394_Kill')
RegisterUnitEvent(3394, 4, 'mob3394_Die')
